package com.quickask.entity;

import java.io.Serializable;

/**
 * Created by NaSa on 2015/10/29.
 */
public class AsknowQuestionSet extends AsknowQuestionSetEntity implements Serializable {
    private String userNickname;  //用户昵称
    private String userIcon;   //用户头像
    private Double distance;   //距离
    private String locationDetail;  //详细地理位置
    private String answerContent;

    public String getUserNickname() {
        return userNickname;
    }

    public void setUserNickname(String userNickname) {
        this.userNickname = userNickname;
    }

    public String getUserIcon() {
        return userIcon;
    }

    public void setUserIcon(String userIcon) {
        this.userIcon = userIcon;
    }

    public Double getDistance() {
        return distance;
    }

    public void setDistance(Double distance) {
        this.distance = distance;
    }

    public String getLocationDetail() {
        return locationDetail;
    }

    public void setLocationDetail(String locationDetail) {
        this.locationDetail = locationDetail;
    }

    public String getAnswerContent() {
        return answerContent;
    }

    public void setAnswerContent(String answerContent) {
        this.answerContent = answerContent;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof AsknowQuestionSet)) return false;
        if (!super.equals(o)) return false;

        AsknowQuestionSet that = (AsknowQuestionSet) o;

        if (userNickname != null ? !userNickname.equals(that.userNickname) : that.userNickname != null) return false;
        if (userIcon != null ? !userIcon.equals(that.userIcon) : that.userIcon != null) return false;
        if (distance != null ? !distance.equals(that.distance) : that.distance != null) return false;
        if (locationDetail != null ? !locationDetail.equals(that.locationDetail) : that.locationDetail != null)
            return false;
        return !(answerContent != null ? !answerContent.equals(that.answerContent) : that.answerContent != null);

    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (userNickname != null ? userNickname.hashCode() : 0);
        result = 31 * result + (userIcon != null ? userIcon.hashCode() : 0);
        result = 31 * result + (distance != null ? distance.hashCode() : 0);
        result = 31 * result + (locationDetail != null ? locationDetail.hashCode() : 0);
        result = 31 * result + (answerContent != null ? answerContent.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "AsknowQuestionSet{" +
                "userNickname='" + userNickname + '\'' +
                ", userIcon='" + userIcon + '\'' +
                ", distance=" + distance +
                ", locationDetail='" + locationDetail + '\'' +
                ", answerContent='" + answerContent + '\'' +
                '}';
    }
}
